
function win1000(){
	var winWidth = 0;  
	if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth){
	  winHeight = document.documentElement.clientHeight;  
	  winWidth = document.documentElement.clientWidth;   
	 }  
	 	theHeight = winWidth * 14/15;
		if(winHeight < theHeight){
			$('#footer').hide();
		}else{
			$('#footer').show();
		}
	};


$(window).resize(function(){
		win1000();
		$('.j-child-neat').each(function(index, element) {
				var ulwidth = $(this).width();
				var liNum = $(this).children();
				var liLeng=liNum.length;
				for(i=0;i<liLeng;i++){
					liNum.eq(i).width(ulwidth/liLeng);
					}
			});
		for(k=1;k<12;k++){/*鐢ㄤ簬鍒嗙被鐨勫榻�*/
			$('.j-child-row'+k).each(function(index, element) {
					var fa = $(this).width();
					$(this).children().width(fa/k);
				});
			}
	});
	function proHeight(){
		var swiperH=$('.photo-list li:first img').height();
		$('.photo-list .over').css({'height':swiperH});
		var swiperH=$('.photo-list2 li:first img').height();
		$('.photo-list2 .over').css({'height':swiperH});
		var swiperH=$('.photo-list3 li:first img').height();
		$('.photo-list3 .over').css({'height':swiperH});
		var swiperH=$('.photo-list4 li:first img').height();
		$('.photo-list4 .over').css({'height':swiperH});
		var swiperH=$('.j-photoheight li:first img').height();
		$('.j-photoheight .over').css({'height':swiperH});
	}
	function pageHeight(){
		var swiperH=$('.swiper .swiper-slide:first img').height();
		$('.swiper,.swiper .swiper-wrapper, .swiper .swiper-slide').css({'height':swiperH});
	}
	
	$(window).load(function(){
		pageHeight();
		proHeight();
	});
//杩斿洖椤堕儴
	$(document).ready(function(){
		$('.sub-content table,.detail-con table').attr('width','100%').width('100%');

		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#back_top').fadeIn();
			} else {
				$('#back_top').fadeOut();
			}
		});
    	$('#back_top a').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
		for(k=1;k<12;k++){/*鐢ㄤ簬鍒嗙被鐨勫榻�*/
		$('.j-child-row'+k).each(function(index, element) {
				var fa = $(this).width();
				$(this).children().width(fa/k);
			});
		}
		
		$('.j-child-num').each(function(i,e){
			var liNum=$(this).children();
			var li_leng=liNum.length;
			for(var j=0; j<li_leng; j++){
				var li_class=liNum.eq(j).attr("class");
				if(li_class==null){li_class=""}
				j2=j+1;
				var li_str="child-"+j2+" ";
				var li_newclass=li_str + li_class;
				liNum.eq(j).attr("class",li_newclass);
				li_newclass="";
			}
		});
		
		$('.j-child-neat').each(function(index, element) {
			var ulwidth = $(this).width();
			var liNum = $(this).children();
			var liLeng=liNum.length;
			for(i=0;i<liLeng;i++){
				liNum.eq(i).width(ulwidth/liLeng);
				}
		});
		for(k=2;k<12;k++){/*鐢ㄤ簬鍒嗙被鐨勫榻�*/
		$('.j-child-auto'+k).each(function(index, element) {
				$(this).find('li').width(100/k+"%");
				var liNum = $(this).find('li');
				var liLeng=liNum.length;
				for(i=0;i<=k;i++){
					if((liLeng+i)%k==0){
						for(j=1;j<=k-i;j++){
							liNum.eq(liLeng-j).width(100/(k-i)+"%");
							}
						}
					}
			});
		}
		
		if($('.swiper-1').length>0){
				var swiperFree = $('.swiper-1').swiper({
					pagination : '.pag-1',
					freeModeFluid: true,
					autoPlay:3000,
					slidesPerSlide :1
				})
				//Clickable pagination
				$('.pag-1 .swiper-pagination-switch').click(function(){
					swiperFree.swipeTo($(this).index());
				})
			}
		if($('.swiper-2').length>0){
				var swiperFree2 = $('.swiper-2').swiper({
					pagination : '.pag-2',
					freeModeFluid: true,
					autoPlay:3000,
					slidesPerSlide :1
				})
				//Clickable pagination
				$('.pag-2 .swiper-pagination-switch').click(function(){
					swiperFree2.swipeTo($(this).index());
				})
			}
			
		if($('.thumb-con').length>0){
				var albumimg = $('.thumb-con').swiper({
					freeModeFluid: true,
					slidesPerSlide :4
				})
				$('.thumb-prev').on('click', function(e){
					e.preventDefault()
					albumimg.swipePrev()
				  })
				  $('.thumb-next').on('click', function(e){
					e.preventDefault()
					albumimg.swipeNext()
				  })
			}
	});
	
	//搴曢儴瀵艰埅
	$(function(){
		var dataPosition=$('#footer').attr('data-position');
		var footerH=$('#footer').height();
		if(dataPosition == 'fixed'){
			$('#footer').css({'position':'fixed','bottom':'0','width':'100%'});
			$('body').css({'padding-bottom':footerH});
		}
	});	
	
//涓嬫媺瀵艰埅
/*$(document).ready(function(){
	$('.top-box .ico-menu').click(function(){
		var navpanelHeight=$('#navpanel').height();
		var panelHeight=$('#navpanel ul li').length*$('#navpanel ul li').height()+5;
		if(navpanelHeight==0){
			$('#navpanel').animate({'height':panelHeight},200);
		}else{
			$('#navpanel').animate({'height':0},200);
		}
	});
});*/